#include <bits/stdc++.h>
using namespace std;
int a[1000001];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int t;
  cin >> t;

  // Initialize two pointers
  int left = 1, right = n;
  bool found = false;

  // Use two-pointer technique to find the pair
  while (left < right) {
    int sum = a[left] + a[right];
    if (sum == t) {
      found = true;
      break;
    } else if (sum < t) {
      left++;
    } else {
      right--;
    }
  }

  // Output the result
  if (found) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}